#!/bin/bash
echo "进入工作目录"
cd /root/bilibili
echo "删除缓存"
rm -rf static-file
echo "拉取最新代码"
git clone https://gitee.com/showurl/static-file.git && \
echo "拉取成功"
echo "替换kplayer.yaml文件 bilibili.ini文件"
rm -rf /root/bin/kplayer/kplayer.yaml
rm -rf /etc/supervisord.d/bilibili.ini
mv static-file/kplayer/kplayer.yaml /root/bin/kplayer
mv static-file/kplayer/bilibili.ini /etc/supervisord.d/bilibili.ini
echo "重启kplayer服务"
supervisorctl restart all
supervisorctl status
echo "打印日志"
tail -f /root/bilibili/logs/kplayer.err.log